<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="managesystem.Student" %>
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />

<script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>

<%
	Student currStud = (Student) session.getAttribute("currStud");
	String error = (String) session.getAttribute("error");
	session.setAttribute("error",null);
%>
<div data-role="page" id="login" data-add-back-btn="false">
</a><div data-role="header" data-theme="b">
		<h1>Login or Register</h1>
	</div>

	<div data-role="content" data-theme="b">	
		<p>Login or register yourself first.</p>
		<%
			if(error!=null){
				%>
					<p style="color:red;"><%=error %></p>
				<%
			}
		%>
		
	</div>

	
	<div data-role="footer" data-position="fixed" data-theme="b">
        <div data-role="navbar">
	        <ul>
                   <li><a href="#register">How to register?</a></li>
                   <li><a href="#loginpanel" data-rel="dialog">Login</a></li>
	        </ul>
        </div>
       </div>

</div>

<div data-role="page" id="loginpanel">

	<div data-role="header" data-theme="b">
		<h1>Scan || Login</h1>
	</div>

	<div data-role="content" data-theme="b">	
		<form action="/verifyStudent" method="POST">
           <fieldset>
           
           <label for="username">Username:</label>
           <input type="text" name="username" id="username" value=""  />

           <label for="password">Password:</label>
           <input type="password" name="password" id="password" value="" />

           <input id="Submit1" type="submit" value="Login" data-role="button" data-inline="true" data-theme="b" />
           <hr />
           
           </fieldset>
       </form>		
		
	</div>

	<div data-role="footer" data-theme="b">
		<h4>Loginpanel</h4>
	</div>
</div>
<div data-role="page" id="register">

	<div data-role="header" data-theme="b">
		<h1>Scan || Register</h1>
	</div>

	<div data-role="content" data-theme="b">
		<h4>How to register ?</h4>
		<p> In order to use this mobile app you need to have an account on the site. Please go to our site and register yourself.</p>
		<p>http://analysestudy.appspot.com</p>
		<p>View with a normal browser.</p>
	</div>

	<div data-role="footer" data-theme="b">
		<h4>Register</h4>
	</div>
</div>